@extends('admin.layouts.layout')
@section('content')
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title">
                <h5>添加代理商</h5>
            </div>
            <div class="ibox-content">
                <a class="menuid btn btn-primary btn-sm" href="javascript:history.go(-1)">返回</a>
                <a href="{{route('agent.index')}}"><button class="btn btn-primary btn-sm" type="button"><i class="fa fa-plus-circle"></i> 代理商管理</button></a>
                <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                <form class="form-horizontal m-t-md" action="{{ route('agent.store') }}" method="post" accept-charset="UTF-8" enctype="multipart/form-data">
                    {!! csrf_field() !!}
                    <div class="form-group">                       
							<div class="col-sm-10">
                                <div class="row">
                                    <label class="col-sm-2 control-label">公司名称</label>
                                    <div class="col-md-3">
			                          <input type="text" class="form-control" name="company_name" value="{{old('company_name')}}" required data-msg-required="请输入公司名称">
			                            @if ($errors->has('company_name'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('company_name')}}</span>
			                            @endif
                                    </div>
                                    <label class="col-sm-2 control-label">公司地址</label>
                                    <div class="col-md-3">
		                            <input type="text" class="form-control" name="address" value="{{old('address')}}" required data-msg-required="请输入公司地址">
		                            @if ($errors->has('address'))
		                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('address')}}</span>
		                            @endif                                       
                                    </div>
                                </div>
                            </div>                                                                                                                           
                    </div>                   
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">入驻身份</label>
                                   <div class="col-md-2">
			                            <select class="form-control" name="company_type">
			                                <option value="1" @if(old('status') == 1) selected="selected" @endif>代理商</option>
			                                <option value="2" @if(old('status') == 2) selected="selected" @endif>直营公司</option>
			                                <option value="3" @if(old('status') == 3) selected="selected" @endif>直营公司</option>
			                            </select>
			                            @if ($errors->has('company_type'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('company_type')}}</span>
			                            @endif
                                  </div>                                      
                             </div>
                         </div>
                    </div>                                                                                                                                                                                    
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                    
                    <div class="form-group">                       
							<div class="col-sm-10">
                                <div class="row">
                                    <label class="col-sm-2 control-label">法人姓名</label>
                                    <div class="col-md-3">
			                          <input type="text" class="form-control" name="legal_person" value="{{old('legal_person')}}" required data-msg-required="请输入法人姓名">
			                            @if ($errors->has('legal_person'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('legal_person')}}</span>
			                            @endif
                                    </div>
                                    <label class="col-sm-2 control-label">法人联系电话</label>
                                    <div class="col-md-3">
		                            <input type="text" placeholder="" class="form-control" name="legal_person_phone" value="{{old('legal_person_phone')}}" required data-msg-required="请输入法人联系电话">
		                            @if ($errors->has('legal_person_phone'))
		                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('legal_person_phone')}}</span>
		                            @endif
                                       
                                    </div>
                                </div>
                            </div>                                                                                                                           
                    </div>                   
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">联系人姓名</label>
                                   <div class="col-md-3">
			                        <input type="text" class="form-control" name="linkman_name" value="{{old('linkman_name')}}" required data-msg-required="请输入联系人姓名">
			                            @if ($errors->has('linkman_name'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('linkman_name')}}</span>
			                            @endif
                                  </div> 
                                  <label class="col-sm-2 control-label">联系人电话</label>
                                  <div class="col-md-3">
		                          <input type="text" placeholder="" class="form-control" name="linkman_phone" value="{{old('linkman_phone')}}" required data-msg-required="请输入联系人电话">
		                            @if ($errors->has('linkman_phone'))
		                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('linkman_phone')}}</span>
		                            @endif                                       
                                  </div>                                  
                                                                       
                             </div>
                         </div>
                    </div>                      
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>
 
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">账号</label>
                                   <div class="col-md-3">
			                        <input type="text" class="form-control" name="login_name" value="{{old('login_name')}}" required data-msg-required="请输入账号">
			                            @if ($errors->has('login_name'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('login_name')}}</span>
			                            @endif
                                  </div>                                                                                                         
                             </div>
                         </div>
                    </div>  
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">密码</label>
                                   <div class="col-md-3">
			                        <input type="text" class="form-control" name="password" value="{{old('password')}}" required data-msg-required="请输入密码   ">
			                            @if ($errors->has('password'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('password')}}</span>
			                            @endif
                                  </div>
                             </div>
                         </div>
                    </div>                                          
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>                   
                    
                     <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">平台初始金豆数量</label>
                                   <div class="col-md-3">
			                        <input type="text" class="form-control" name="balance" value="{{old('balance')}}" required data-msg-required="请输入金豆">
			                            @if ($errors->has('balance'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('balance')}}</span>
			                            @endif
                                  </div>                                                                                                         
                             </div>
                         </div>
                    </div>                                          
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>                      
                    
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">充值设置</label>
                                   <div class="col-md-2">
			                        <input type="text" placeholder="兑换比例 10:25" class="form-control" name="ratio" value="{{old('ratio')}}" required data-msg-required="请输入充值比例">
			                            @if ($errors->has('ratio'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('ratio')}}</span>
			                            @endif
                                  </div>                                                                                                         
                             </div>
                         </div>
                    </div>                                          
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>  
                    
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">选择银行</label>
                                   <div class="col-md-2">
			                            <select class="form-control" name="bank_name">
			                                <option value="1" @if(old('status') == 1) selected="selected" @endif>建设银行</option>
			                                <option value="2" @if(old('status') == 2) selected="selected" @endif>招商银行</option>
			                            </select>
			                            @if ($errors->has('bank_name'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('bank_name')}}</span>
			                            @endif
                                  </div>                                                                                                         
                             </div>
                         </div>
                    </div>
                    <div class="form-group">                       
						<div class="col-sm-10">
                             <div class="row">
                                   <label class="col-sm-2 control-label">输入账号</label>
                                   <div class="col-md-3">
			                        <input type="text" class="form-control" name="bank_account" value="{{old('bank_account')}}" required data-msg-required="请输入银行账号">
			                            @if ($errors->has('bank_account'))
			                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('bank_account')}}</span>
			                            @endif
                                  </div>                                                                                                         
                             </div>
                         </div>
                    </div>                                            
                                         
       
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                    <div class="form-group">
                        <div class="col-sm-12 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit"><i class="fa fa-check"></i>&nbsp;保 存</button>　<button class="btn btn-white" type="reset"><i class="fa fa-repeat"></i> 重 置</button>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </form>
            </div>
        </div>
    </div>
@endsection